package _10_ii;

import java.util.Scanner;

/**
 * @author ：Rwto
 * @date ：Created in 2021/7/12 13:39
 * @description：青蛙跳台阶问题 动态规划， 空间复杂度O（n）
 */
public class Solution01 {
    public int numWays(int n) {

        int[] num = new int[n+1];
        num[0]=1;
        if(n>0)
            num[1]=1;
        for(int i = 2;i<=n;i++){
            num[i]=(num[i-2]+num[i-1])%1000000007;
        }

        return num[n];
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            System.out.println(new Solution01().numWays(n));
        }
    }
}
